package bao;

import java.util.ArrayList;
import java.util.Scanner;

public class HelloWorld {
    public static void main(String[] args) {
        Animal a = new Cat();
        a.setAge(5);
        a.setName("加菲");
        System.out.println(a.getName()+","+a.getAge());
        a.eat();
        System.out.println("------------");

        a = new Cat("加菲",18);
        System.out.println(a.getName()+","+a.getAge());
        a.eat();
    }




}
